def yu(num):
    global money
    if num :
        print("查询余额")
    print(f"{name},你好，你的余额是{money}")
def cunkuan():
    global money
    a = input("请输入存款金额")
    a = int(a)
    money = money +a
    yu(False)
    manu()
def qukuan():
    global money
    a = input("请输入取款金额")
    a = int(a)
    money = money - a
    yu(False)
    manu()
def manu():
    global x
    print(f"{name},您好，欢迎来到银行，请选择操作")
    print("查询余额 \t\t【输入1】")
    print("存款 \t\t【输入2】")
    print("取款 \t\t【输入3】")
    print("退出 \t\t【输入4】")
    x = input("输入选择")
    return x
name = input("输入姓名:")
money = 5000000
while True :
    x = manu()
    if x == "1" :
        yu(True)
        continue
    elif x == "2":
        cunkuan()
        continue
    elif x == "3" :
        qukuan()
        continue
    else:
        print("退出")
        break






